﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using iWare.Wms.Core.Enum;

namespace iWare.Wms.Core
{
    /// <summary>
    /// 任务管理
    /// </summary>
    [Table("wms_task")]
    [Comment("任务管理")]
    public class WmsTask:DEntityBase
    {
        /// <summary>
        /// 任务号
        /// </summary>
        [Comment("任务号")]
        [Required]

        [MaxLength(50)]
        public string TaskNo { get; set; }

        /// <summary>
        /// 任务方式;数据字典
        /// </summary>
        [Comment("任务方式")]
        [Required]

        public TaskModel TaskModel { get; set; }

        /// <summary>
        /// 任务类型;数据字典
        /// </summary>
        [Comment("任务类型")]
        [Required]

        public TaskType TaskType { get; set; }

        /// <summary>
        /// 任务级别
        /// </summary>
        [Comment("任务级别")]
        [Required]

        public int TaskLevel { get; set; }

        /// <summary>
        /// 任务状态;数据字典
        /// </summary>
        [Comment("任务状态")]
        [Required]

        public Enum.TaskStatus TaskStatus { get; set; }

        /// <summary>
        /// 托盘编号
        /// </summary>
        [Comment("托盘编号")]
        [Required]

        [MaxLength(50)]
        public string ContainerCode { get; set; }

        /// <summary>
        /// 起始库位
        /// </summary>
        [Comment("起始库位")]
        [Required]

        [MaxLength(50)]
        public string SourcePlace { get; set; }

        /// <summary>
        /// 目标库位
        /// </summary>
        [Comment("目标库位")]
        [Required]

        [MaxLength(50)]
        public string ToPlace { get; set; }

        /// <summary>
        /// 巷道
        /// </summary>
        [Comment("巷道")]
        [Required]

        public int Aisle { get; set; }

        /// <summary>
        /// 库区名称
        /// </summary>
        [Comment("库区名称")]
        [Required]

        [MaxLength(50)]
        public string AreaName { get; set; }

        /// <summary>
        /// 组盘记录ID
        /// </summary>
        [Comment("组盘记录ID")]
        [Required]

        [MaxLength(50)]
        public string OrderNo { get; set; }

        /// <summary>
        /// 发送次数
        /// </summary>
        [Comment("发送次数")]

        public int SendTimes { get; set; }

        /// <summary>
        /// 任务执行堆垛机ID
        /// </summary>
        [Comment("任务执行堆垛机ID")]

        public int DodeviceId { get; set; }

        /// <summary>
        /// 设备执行节点ID
        /// </summary>
        [Comment("设备执行节点ID")]

        [MaxLength(50)]
        public string DodevicenodeId { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        [Comment("设备类型")]

        [MaxLength(50)]
        public string Dodevicetype { get; set; }


    }
}
